package com.an.makedata;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import org.eclipse.core.internal.jobs.ObjectMap;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

public class Test {

	public static void main(String[] args) {
		PhoneNumber phoneNumber = new PhoneNumber();
		ObjectMapper objectMapper = new ObjectMapper();
		phoneNumber.setAxbBindingPhoneNumberMap(new HashMap<>());
		phoneNumber.getAxbBindingPhoneNumberMap().put("123", "123");
		phoneNumber.getAxbBindingPhoneNumberMap().put("abc", "abc");
		phoneNumber.getAxbBindingPhoneNumberMap().put("qwe", "qwe");
		try {
			System.out.println(objectMapper.writeValueAsString(phoneNumber));
			@SuppressWarnings("unchecked")
			Map<String, String> ss = objectMapper.readValue(objectMapper.writeValueAsString(phoneNumber), Map.class);
			
			System.out.println("以前： "+ ss);
			ss.remove("axbBindingPhoneNumberMap");
			ss.remove("binding");
			System.out.println("之后：" + ss);
			System.out.println("axbBindingPhoneNumberMap".equals("axbBindingPhoneNumberMap"));
		} catch (JsonProcessingException e) {
			
			// TODO Auto-generated catch block
			e.printStackTrace();
			
		} catch (IOException e) {
			
			// TODO Auto-generated catch bloc""k
			e.printStackTrace();
			
		}
	}
}

